package com.util.string;

public class Native2ascii {

	public String convert(String s) {
		String unicode = "";
		char[] charary = new char[s.length()];
		for (int i = 0; i < charary.length; i++) {
			charary[i] = (char) s.charAt(i);
			unicode += "\\u" + Integer.toString(charary[i], 16);
		}
		return unicode;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Native2ascii _Native2ascii=new Native2ascii();
		System.out.println("hello world!" + _Native2ascii.convert("很好"));
	}

}
